# -*- encoding:utf-8 -*-
# @time:2023-01-14 16:03
# @Author : serein
# @Email: serein@qq.com
# @File:celery_main.py
# @Software: PyCharm

import os
from celery import Celery

os.environ.setdefault('DJANGO_SETTINGS_MODULE','drfstudy20.settings')

app = Celery('drfstudy20') #创建celery应用
app.config_from_object('celery_tasks.celery_config')#引入celery配置，任务队列
app.autodiscover_tasks(['celery_tasks.email', ] )#导入任务

# from celery import Celery
# import os
#
# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'drfstudy20.settings')
#
# app = Celery('drfstudy20')  # 创建celery应用
#
# app.config_from_object('celery_tasks.celery_config')  # 引入celery配置，任务队列
#
# app.autodiscover_tasks(['celery_tasks.email', ])  # 导入任务
